package org.pupil.tolerant.impl;

import org.pupil.tolerant.FaultContext;
import org.pupil.tolerant.FaultTolerantStrategy;

/**
 * @Description: 容错策略：快速失败
 * @Author: pupil
 * @Date: 2024/07/17 下午 3:55
 */
public class FailFastFaultTolerantStrategy implements FaultTolerantStrategy {
    @Override
    public Object handler(FaultContext faultContext) throws Exception {
        // 直接返回错误
        return faultContext.getException();
    }
}
